From golang:alpine

ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.io,direct

WORKDIR /home/

RUN git clone https://gitee.com/moglin/buaashow-gateway.git && \
    git clone https://gitee.com/moglin/buaashow.git && \
    git clone -b gh-pages https://gitee.com/moglin/buaashow-admin.git 
    # git clone -b gh-pages https://github.com/jongjyh/workstation.git

RUN cd buaashow && go build -o buaashow && cd ../
RUN cd buaashow-gateway && go build -o gateway && cd ../

COPY ./cfg-show.yaml buaashow/config.yaml
RUN mkdir buaashow/resources
COPY ./cfg-gateway.yaml buaashow-gateway/cfg.yaml
RUN mkdir buaashow-gateway/static && mv buaashow-admin buaashow-gateway/static/admin

RUN apk add --no-cache  gettext tzdata   && \
    cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo "Asia/Shanghai" >  /etc/timezone && \
    date && \
    apk del tzdata

WORKDIR /home/buaashow-gateway/
ENTRYPOINT ./gateway